#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<math.h>
int narcissistic(int n)
{
    int number = n;
    int sum = 0;
    while (number != 0)
    {
        sum += pow(number % 10, 3);
        number /= 10;
    }
    if (sum == n)
        return 1;
    else
        return 0;
}
int main()
{
    int m = 0;
    int n = 0;
    int count = 0;
    scanf("%d%d", &m, &n);
    for (int i = m; i <= n; i++)
    {
        if (narcissistic(i))
        {
            printf("%d ", i);
            count++;
        }
    }
    if (count == 0)
    {
        printf("no\n");
    }

    return 0;
}